export type Key = string | number;

export interface TreeItem<K extends Key = Key> {
  disabled: boolean;
  desc: React.ReactNode;
  key: K;
  value: K;
  title?: React.ReactNode;
  label?: string;
  parent_key?: K;
  parent_keys?: K[];
  children?: TreeItem<K>[];
}

export type MapTreeDataResult<K extends Key, O = any> = readonly [(TreeItem<K> & O)[], Map<K, TreeItem<K> & O>];
